﻿using System.Data;
using ECM7.Migrator.Framework;

namespace music.domain.Migrations
{
	[Migration(1)]
	public class Migration001_SongTable : Migration
	{
		public override void Apply()
		{
			Database.AddTable("Song",
				new Column("Id", DbType.Guid, ColumnProperty.PrimaryKey, "newid()"),
				new Column("Title", DbType.String.WithSize(200)),
				new Column("Artist", DbType.String.WithSize(200)),
				new Column("Created", DbType.DateTime),
				new Column("Mp3", DbType.Binary.WithSize(int.MaxValue))
			);
		}

		public override void Revert()
		{
			Database.RemoveTable("Song");
		}
	}
}